package com.lingyistudio.blog.entity;

import com.lingyistudio.common.entity.BaseEntity;
import lombok.Data;

/**
 * 前端使用
 * @Author :  LingYi
 * @ClassName : BlogFront
 * @Date :   2019/7/29 14:10
 */

@Data

public class BlogFront extends BaseEntity {

    private String id;  //文章id
    private String time;  //文章创建时间
    private String blogText;  //文章内容
    private String blogTitle;  //文章标题
    private String[] permission={"公开(所有人可见)","仅自己可见","部分人可见"};  //可看见的人员的权限

    private int permissionCode;  //可看见的人员的权限

    public void BackToFront( BlogBack blogBack) {
        this.setId(blogBack.getBlogId());
        this.setTime(blogBack.getGmtCreate());
        this.setBlogText(blogBack.getBlogContent());
        this.setBlogTitle(blogBack.getBlogHead());
        this.setVersion(blogBack.getVersion());
    }
}
